/**
 * Created with IntelliJ IDEA.
 * User: Thoughtworker
 * Date: 8/25/13
 * Time: 3:17 PM
 * To change this template use File | Settings | File Templates.
 */
public class Player {


    private int playerNumber;
    private int playerTurn;
    private int playerScore;
    private boolean winner;

    public Player(int playerNumber) {
        this.playerNumber=playerNumber;
    }

    public void scorePoint() {
        if(playerTurn == 0){
            playerScore = 15;
        }else if(playerTurn == 1){
            playerScore = 30;
        }else if(playerTurn == 2){
            playerScore = 40;
        }else if(playerTurn == 3){
            winner = true;
        }
        playerTurn++;
    }

    public Integer getScore() {
        return playerScore;
    }

    public  String getName() {
        return "Player"+" "+playerNumber;
    }

    public boolean isWinner() {
        return winner;
    }

    public void setWinner(boolean winner) {
        this.winner = winner;
    }
}
